const locationOrigin = typeof window === "undefined" ? "" : window.location.origin;
if (!locationOrigin || locationOrigin.indexOf("localhost") > -1) {
	// locationOrigin = locationOrigin + '/gov'
}

const domain = locationOrigin + "/api/v1";

const api = {

	// ***************************** 学分管理 *****************************
	courseManageList: `${domain}/courseManageList`,
	courseManageDelete: `${domain}/courseManageDelete`,
	courseUpdateStatus: `${domain}/courseUpdateStatus`,
	courseManageAdd: `${domain}/courseManageAdd`,
	courseManageQueryById: `${domain}/courseManageQueryById`,
	courseManageQueryTermOptions: `${domain}/courseManageQueryTermOptions`,
	courseManageQueryClassifyOptions: `${domain}/courseManageQueryClassifyOptions`,


	// app
	appLoginByAccount: `${domain}/system/login`,
	appIsUserLogin: `${domain}/auth/isLogin`,
	appLoginSmscode: `${domain}/auth/smscode`,
	appLoginBySms: `${domain}/auth/login/sms`,
	appLoginResetPassword: `${domain}/auth/resetpassword`,
	appGetUserInfo: `${domain}/authCurrentUserInfo`,
	appGetUserResources: `${domain}/appGetUserResources`,
	appGetMenuList: `${domain}/authMenuList`,
	appLogout: `${domain}/appLogout`,
	appGetEntityByUrl: `${domain}/auth/getEntityByUrl`,
	appQueryEntityIcon: `${domain}/file/getEntityIconUrl`,
	// ***************************** common *****************************
	commonQueryOperateLog: `${domain}/log/queryList`,
	commonQueryDict: `${domain}/dict/getList`,
	// 当前用户所属区域范围
	commonQueryUserRegion: `${domain}/user/getUserRegion`,
	// 实体下所属区域范围
	commonQueryEntityRegion: `${domain}/entity/getEntityRegion`,
	commonQueryEnterpriseOpts: `${domain}/company/getCompanyByEntityId`,
	commonQueryRegions: `${domain}/adcode/queryAdCodeTree`,
	commonUploadImage: `${domain}/file/imgUpload`,
	commonUploadFile: `${domain}/file/uploadFile`,
	commonQueryRoleOpts: `${domain}/commonQueryRoleOpts`,
	commonQueryRoleTypeOpts: `${domain}/commonQueryRoleTypeOpts`,
	commonQueryDecryptionResult: `${domain}/company/decry`,
	// 实体下拉框
	commonQueryUserEntities: `${domain}/entity/select/list`,
	// 资源点管理

	commonQueryResourcesByEntity: `${domain}/resourceTree`,
	commonQueryParkCompanyOpts: `${domain}/company/getParkCompanyInfoListByUserType`,

	//资源点管理
	resourceQueryList: `${domain}/resourceQueryList`,
	resourceManageAdd: `${domain}/resourceManageAdd`,
	resourceUpdateStatus: `${domain}/resourceUpdateStatus`,
	resourceManageDelete: `${domain}/resourceManageDelete`,
	resourceManageEdit: `${domain}/resourceManageEdit`,
	resourceTree: `${domain}/resourceTree`,
	resourceManageById: `${domain}/resourceManageById`,
	resourceManageByResourceCode: `${domain}/resourceManageByResourceCode`,

	//菜单管理
	menuQueryList: `${domain}/menuQueryList`,
	menuUpdateStatus: `${domain}/menuUpdateStatus`,


	// ***************************** 用户管理 *****************************
	userQueryList: `${domain}/userQueryList`,
	userUpdateStatus: `${domain}/userUpdateStatus`,
	userManageRolesUnionResources: `${domain}/userManageRolesUnionResources`,
	userManageAddUser: `${domain}/userAdd`,
	userManageDeleteUser: `${domain}/userManageDeleteUser`,
	userManageQueryById: `${domain}/userManageQueryById`,
	userManageEditUser: `${domain}/user/update`,
	userManageAuthUser: `${domain}/userManageAuthUser`,
	userManageQueryAuthDetail: `${domain}/userManageQueryAuthDetail`,
	userManageExportQueryResult: `${domain}/userManageExportQueryResult`,
	userManageUploadFile: `${domain}/userManageUploadFile`,
	userManageCommitFile: `${domain}/userManageCommitFile`,

	// ***************************** 角色管理 *****************************
	roleManageRoleList: `${domain}/roleManageRoleList`,
	roleManageDeleteRole: `${domain}/roleDelete`,
	roleManageInitialResources: `${domain}/role/initialResources`,
	roleManageRoleDetail: `${domain}/roleManageRoleDetail`,
	roleManageAdd: `${domain}/roleManageAdd`,
	roleManageEdit: `${domain}/roleEdit`,
	// ***************************** 租户管理 *****************************
	tenantManageEntityList: `${domain}/tenantManageEntityList`,
	tenantUpdateStatus: `${domain}/tenantUpdateStatus`,
	tenantQueryById: `${domain}/tenantQueryById`,
	tenantManageEdit: `${domain}/tenantManageEdit`,
	tenantManageAdd: `${domain}/tenantManageAdd`,
	tenantManageResourceEdit: `${domain}/tenantManageResourceEdit`,
	tenantManageQueryResource: `${domain}/tenantManageQueryResource`,


	entityManageEntityList: `${domain}/entity/list`,
	entityManageDeleteEntity: `${domain}/entity/delete`,
	entityManageEntityDetail: `${domain}/entity/detail`,
	entityManageInitialResources: `${domain}/entity/initialResources`,
	entityManageAddEntity: `${domain}/entity/create`,
	entityManageEdit: `${domain}/entity/update`,
	entityManageEditRegion: `${domain}/entity/update-region`,
	entityManageResourceTree: `${domain}/entity/getEntityResourceTree`,
	entityManageBusinessStrategyOptions: `${domain}/regulation-support/business-strategy/options`,
	entityManageEditResourceName: `${domain}/resource/entity/update`,
	entityManageUploadCustomAdcodeFileCode: `${domain}/customAdcode/upload`,
	entityManageCustomAdcodeFileCodeTemplate: `${domain}/customAdcode/downloadTemplate`,
	entityManageAdCodeListAndCustomAreaTree: `${domain}/entity/region`,
	// 实体UI配置
	entityUiConfigSave: `${domain}/entityUiConfig/save`,
	entityUiConfigQueryByEntityId: `${domain}/entityUiConfig/queryByEntityId`,
	entityManageEntitySortUpdate: `${domain}/resource/entity/sortUpdate`,



};

export default api;
